/**
 * 宠物实体类，用于存储宠物的基本信息
 * @author 用户名
 * @version 1.0
 */
package animal;

public class Pet {
    private String petId;  //宠物id
    private String name;   //宠物姓名
    private String breed;  //宠物种类
    private int age;       //宠物年龄
    private String ownerId; //主人id

    /**
     * Pet宠物信息构造方法
     * @param petId 宠物唯一标识
     * @param name 宠物名称
     * @param breed 品种信息
     * @param age 年龄（单位：岁）
     * @param ownerId 关联的主人ID
     */
    public Pet(String petId, String name, String breed, int age, String ownerId) {
        this.petId = petId;
        this.name = name;
        this.breed = breed;
        this.age = age;
        this.ownerId = ownerId;
    }

    // Getters and setters
    public String getPetId() { return petId; }
    public void setName(String name) { this.name = name; }
    public void setBreed(String breed) { this.breed = breed; }
    public void setAge(int age) { this.age = age; }
    public void setOwnerId(String ownerId) { this.ownerId = ownerId; }
    
    public String getName() { return name; }
    public String getBreed() { return breed; }
    public int getAge() { return age; }
    public String getOwnerId() { return ownerId; }

    @Override
    public String toString() {
        return "宠物id ="+petId + "\t姓名=" + name + "\t品种=" + breed + "\t年龄="+age;
    }
}